<%inherit file="network_base.html" />

<%block name="head">
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/skins/simple/style.css') }" />
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/sets/markdown/style.css') }" />
</%block>

<%block name="innav">
<li><a href="${ reverse_url('admin:network:gateway') }">${ _("Gateway") }</a> <span class="divider">/</span></li>
<li>${ _("Gateway Configure") }</li>
</%block>

<%block name="submain">

<script type="text/javascript" src="${ static_url('markitup/jquery.markitup.js') }"></script>
<script type="text/javascript" src="${ static_url('markitup/sets/markdown/set.js') }"></script>

<div>
  <form method="POST">${ xsrf_form_html() }
    <fieldset>
      <legend>${ _("Gateway Configure") }</legend>
      ${ form.name.label } ${ form.name() }
      ${ form.html_errors(form.name.errors) }

      ${ form.start.label } ${ form.start() }
      ${ form.html_errors(form.start.errors) }

      ${ form.end.label } ${ form.end() }
      ${ form.html_errors(form.end.errors) }

      ${ form.netmask.label } ${ form.netmask() }
      ${ form.html_errors(form.netmask.errors) }

      ${ form.gateway.label } ${ form.gateway() }
      ${ form.html_errors(form.gateway.errors) }

      ${ form.nameservers.label } ${ form.nameservers() }
      ${ form.html_errors(form.nameservers.errors) }

      ${ form.exclude_ips.label } ${ form.exclude_ips() }
      ${ form.html_errors(form.exclude_ips.errors) }

      ${ form.description.label } ${ form.description() }
      ${ form.html_errors(form.description.errors) }

      <button type="submit" class="btn">${ _("Submit") }</button>
    </fieldset>
  </form>
</div>

<script type="text/javascript" >
   mySettings.previewParserPath = "/t/preview?markup_language=markdown&_xsrf=${ xsrf_cookie }";
   $(document).ready(function() {
      $("#description").markItUp(mySettings);
   });
</script>

</%block>
